<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('重新办理信件工单')"/>
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">

</head>

<body style="background-color: #F4F6FA">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" th:object="${mmailWorkForm}" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" th:field="*{pkId}"/>

        <div class="col-sm-12" style="display: flex">
            <div class="col-sm-12 entering-page">
                <!--    回复电话工单    -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">回复信件工单</h4>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label  entering-pd">工单编号：</label>
                        <div class="col-sm-8">
                            <input name="fromName" th:field="*{workFormNo}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">工单类别：</label>
                        <div class="col-sm-8">
                            <input name="smSex" th:field="*{setProName}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-2 control-label entering-pd" style="color: red">主题：</label>
                        <div class="col-sm-10">
                            <input th:field="*{fromTopic}" type="text" class="form-control">
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label  entering-pd">当前步骤：</label>
                        <div class="col-sm-8">
                            <input name="fromName" th:field="*{crtStepName}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label entering-pd">操作时间：</label>
                        <div class="col-sm-8">
                            <input name="smSex" th:field="*{crtStepTime}"
                                   class="form-control scene " type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group col-sm-6">
                        <label class="col-sm-4 control-label  entering-pd">调整到步骤：</label>
                        <div class="col-sm-8">
                            <input name="preName" th:value="${sprocessStep.preName}"
                                   class="form-control scene " type="text">
                            <input name="preId" th:value="${sprocessStep.preId}" type="hidden">
                        </div>
                    </div>
                </div>
                <!--按钮-->
                <div class="col-sm-12" style="display: flex;justify-content:center;margin:15px 0px 15px 0px">
                    <div class="form-group">
                        <div class="col-sm-3" style="display: flex;justify-content: space-evenly;">
                            <button type="button" class="btn btn-sm btn-success" onclick="sub()">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
                            <button type="button" class="btn btn-sm btn-light" onclick="closeItem()">关闭</button>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">最近处理记录</h4>
                </div>
                <table id="bootstrap-table"></table>

            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>

<script>
    var prefix = ctx + "system/mMailWF";
    $(function () {
        let wfId = $('#pkId').val();
        //拟派电话工单列表
        var options = {
            url: prefix+'/cmnFile/flowRollBackLog/'+wfId,
            sortName: "logId",
            modalName: "派单",
            sortOrder: "desc",
            uniqueId: "logId",
            showColumns: false,                  //是否显示所有的列（选择显示的列）
            showRefresh: false,
            showSearch: false,
            showToggle: false,
            fixedColumns: true,
            fixedNumber: 1,
            fixedRightNumber: 1,
            columns: [{
                field: 'logId',
                title: 'id',
                visible: false
            },
                {
                    field: 'logTime',
                    title: '操作时间',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'opDeptName',
                    title: '单位名称',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'opUserName',
                    title: '操作人',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'opAction',
                    title: '动作',
                    width: 100,
                    align: 'center',
                }, {
                    field: 'opDesc',
                    title: '操作简述',
                    width: 240,
                    align: 'center',
                }]
        };
        $.table.init(options);
    });

    function sub(){
        if ($.validate.form()) {
            let url = prefix + "/cmnFile/flowRollBackJson";
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(url,data);
        }
    }


</script>
</body>
</html>

